package com.neusoft.demo10;

import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class TestManager {
    public static void main(String[] args) {
//        Scanner scanner=new Scanner(System.in);
//        List<Student> students=new ArrayList<>();
//        for(int i=1;i<=5;i++){
//            System.out.println("请输入姓名");
//            String name=scanner.next();
//            System.out.println("请输入id");
//            int id=scanner.nextInt();
//            System.out.println("请输入电话");
//            String phone=scanner.next();
//            System.out.println("请输入邮箱");
//            String email=scanner.next();
//            Student student=new Student(name,id,phone,email);
//            students.add(student);
//        }
        //调用Manager类中的方法，先创建对象
        Manager manager = new Manager();
        //manager.writeFile(students);

        List<Student> list = manager.readFile("Student.txt");
        //遍历输出结果
        for (Student student:list) {
            System.out.println(student.getId() + "--" + student.getName());
        }

    }
}
